﻿using System;
using System.Web;
using System.Web.UI;
using Models;
using System.Linq;
using System.Text.RegularExpressions;
using System.IO;
using System.Threading;
using System.Text;
using Aspose.Words;


    public partial class Add : AdminBase
    {
        private int _Id=0;

 
        protected void Page_Load(object sender, EventArgs e)
        {
            Response.CacheControl = "no-cache";

        if (!string.IsNullOrEmpty(Request.Params["NID"]))
        {
            _Id = int.Parse(HttpContext.Current.Request.QueryString["NID"]);
            ShowInfo(_Id);
        }

       




    }

        //保存
    
        private void ShowInfo(int _id)
        {

            Entities mydb = new Entities();
            {

           TRS_newss _news = mydb.TRS_newss.First(p => p.DOCID == _id);
            
            txtTitle.Text = _news.DOCTITLE;
            txtAuthor.Text = _news.EDITOR;
            txtForm.Text = _news.DOCSOURCENAME;
          
            ddlClassId.SelectedValue = _news.DOCCHANNEL.ToString();
           
            txtContent.Text = _news.DOCPUBHTMLCON;
            txtUrl.Text = _news.DOCPUBURL;

            if (_news.DOCLINK != null)
               txtClick.Text = _news.DOCLINK.ToString();

           

          }
        }
    
    }


